set the visible of card field 1 to not the visible of card field 1
if the visible of card field 1 is true then
set the name of me to "Hide Pascal Source"
else set the name of me to "Show Pascal Source"
end mouseUp
-- part 2 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=12 top=26 right=298 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 22
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Source
-- part contents for background part 16
----- text -----
GETRESOURCES XCMD version 1.6
Kevin Calhoun
The GetResources XCMD is intended for XCMD and XFCN developers who need a fast way to copy resources into a stack for testing. For XCMD and XFCN users who want to copy resources from one stack to another, the ResCopy XCMD by Steve Maller is more appropriate than GetResources.
GetResources copies resources to the current stack from a file designated by full pathname. The set of resources to be copied from that file can be defined in three different ways:
1) all resources of type XCMD or XFCN in the file,
2) all the resources found in the file other than resources of type CODE, FREF, or
BNDL, which have been determined to be harmful to the operating system when
copied indiscriminately, and
3) all resources in the file of the types you specify.
GetResources does not rename or renumber resources before adding them to the current stack; instead, it will remove any resource already contained in the current stack that has the same name and type (or the same ID and type) as a resource that it copies to the stack. If the current stack has no resource fork, GetResources will add a resource fork to the stack before copying resources to it.
As with other resource copiers, if you use GetResources to copy a resource into the Home stack, you may have to quit and relaunch HyperCard in order to use it.
WHY DID I WRITE THIS WHEN PERFECTLY GOOD RESOURCE COPIERS EXIST ALREADY?...
There was no way to copy resources blindly from one file to another. I wanted a way to say, "Get me whatever's over there and put it here, and don't keep asking me if it's OK."
INVOKING GETRESOURCES
GetResources "sourceFile","listOfTypes"
GetResources takes two parameters, the second of which is optional.
Parameter 1: the file name (full pathname) of the file to copy from.
Parameter 2: the types of resources to copy. If the second parameter is not present, GetResources copies only the XFCN's and XCMD's found in the specified file. If you pass the string "ALL" for this parameter, GetResources will copy all the resources found in the file (excepting CODE, FREF, and BNDL resources). If this parameter is anything other than "ALL", it is interpreted as a list of resource types to copy.
--copies all XCMD and XFCN resources found in the home stack into the current stack
In case anybody asks, it's true that I wrote DeleteResFork in order to recover from bad things that happened while I was developing GetResources.
Revision history:
15 March 1989 -- first release.
11 June 1989 -- Minor change for compatibility with SuperCard. GetResources checks whether HyperCard is running after copying the resources and goes home and back only under HyperCard.
22 July 1989 -- No longer leaves a NIL master pointer behind when replacing a resource.
-- part contents for card part 2
----- text -----
UNIT AutoResUnit;
{ GetResources XCMD © 1988-1989 by the Trustees of Dartmouth College }